package com.qf.sale.service.impl;

import com.github.pagehelper.PageHelper;
import com.qf.lw.mapper.GoodsMapper;
import com.qf.lw.mapper.GoodsTypeMapper;
import com.qf.lw.pojo.GoodsPojo;
import com.qf.lw.pojo.GoodsTypePojo;
import com.qf.sale.service.IGoodsService;
import com.qf.sale.service.IIndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class GoodsServiceImpl implements IGoodsService {
    @Autowired
    GoodsMapper goodsMapper;

    @Override
    public List<GoodsPojo> queryGoodsByPojo(GoodsPojo goodsPojo) {
        PageHelper.startPage(goodsPojo.getPageNum(),goodsPojo.getPageSize());
        return goodsMapper.queryGoodsByPojo(goodsPojo);
    }
    public GoodsPojo queryGoodsDetail(String gid){
        return goodsMapper.queryGoodsDetail(gid);
    }


}
